<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <title>{% block title %}明日头条{% endblock %}</title>
    <style>
        form > table {border-spacing: 0}
        form > table tr > td:first-child { text-align: right; }
        form > table td{ line-height: 200%; border-top: 1px dotted #444; }
    </style>
</head>
<body>

<table width="100%" style="border-bottom: 1px dashed #333;">
    <tr>
        <td>
            <a href="/">首页</a>
        </td>
        <td width="200" align="right">
            {% if action is defined and action.user is not none %}
                <a href="/article/tougao">投稿</a>
                <a href="/user/profile">设置</a>
                <a href="/u/{{ action.user.username }}">{{ action.user.username }}</a>
                <a href="/logout">退出</a>
            {% else %}
                <a href="/login">登录</a>
                <a href="/register">注册</a>
            {% endif %}
        </td>
    </tr>
</table>

{% block content %}{% endblock %}

</body>
</html>